/*
 * MPEGDecodable.h
 *        -- abstract class define public interface for all component
 *           in the mpeg file
 *
 * Author: Qiu Shuang
 * Date: Mar 1st, 2011
 */
#ifndef DECODABLE_H
#define DECODABLE_H

class MPEGDecodable{
public:
    /*
     * abstract function used to extract related field from mpeg encoded file
     * which takes a memory address as input arguments
     * we simply assume pointer points to proper position to be decoded in the
     * file.
     *
     * NOTE: in c++ char type variable is signed, so we should take care of
     *       comparision
     */
    virtual int decode(const unsigned char *buf) = 0;

    /*
     * abstract function used to access decoded content in mpeg file
     * generally, a memory address points to constant char array
     */
    virtual const unsigned char *decodedContent() const = 0;
};

#endif